#include"TcpServer.hpp"
#include<iostream>

using namespace std;

static void Usage(const std::string &proc)
{
    std::cout << "\nUsage: " << proc << " port\n" << std::endl; 
}
int main(int argc,char*argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(0);
    }
    uint16_t port = std::stoi(argv[1]);
    
    TcpServer* tcpserver = new TcpServer(port);

    tcpserver->Init();
    tcpserver->Start();

    return 0;
}